<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>管理员-用户管理</title>
    <link rel="stylesheet" href="./layui2_9/css/layui.css">
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">


    <!-- 内容主体区域-->
    <div class="layui-body">
        <div style="padding: 30px;" class="layui-fluid">
            <div class="layui-row">
                <div class="layui-col-md12">
                    <span class="layui-badge-dot"></span> <span
                        class="layui-badge-dot layui-bg-orange"></span> <span
                        class="layui-badge-dot layui-bg-green"></span> <span
                        class="layui-badge-dot layui-bg-cyan"></span> <span
                        class="layui-badge-dot layui-bg-blue"></span> <span
                        class="layui-badge-dot layui-bg-black"></span> <span
                        class="layui-badge-dot layui-bg-gray"></span>
                    <fieldset class="layui-elem-field layui-field-title"
                              style="margin-top: 30px;">
                        <legend>用户管理</legend>
                    </fieldset>
                </div>
            </div>


            <!--以下是搜索框-->
            <div class="layui-row">
                <div class="layui-col-md1">&nbsp;</div>
                <div class="layui-col-md10">
                    <form class="layui-form layui-form-pane" lay-filter="formFilter" method="post" action="adminUser.html" target="main">

                        <div class="layui-form-item">

                            <div class="layui-input-inline">
                                <label class="layui-form-label">用户状态</label>
                                <div class="layui-input-block" style="width: 100px;">
                                    <select id="state" name="state" lay-filter="priceFilter0">
                                        <option value="-1" selected="">请选择</option>
                                        <option value="1">正常</option>
                                        <option value="0">限制</option>
                                    </select>
                                </div>
                            </div>

                            <div class="layui-inline">
                                <label class="layui-form-label">用户名</label>
                                <div class="layui-input-block">
                                    <input type="text" name="words" autocomplete="off" class="layui-input" value="">
                                </div>
                            </div>

                            <button class="layui-btn" lay-submit="seform" lay-filter="seform">搜索</button>

                        </div>

                    </form>
                </div>
                <div class="layui-col-md1">&nbsp;</div>
            </div>
            <!--以上是搜索框-->

            <div class="layui-row">
                <div class="layui-col-md1">&nbsp;</div>
                <div class="layui-col-md10">
                    <fieldset class="layui-elem-field">
                        <legend>用户列表</legend>

                        <div style="margin-left: 20px;margin-right: 30px;margin-top: 20px;"></div>
                        <fieldset class="layui-elem-field layui-field-title"
                                  style="margin: 20px;margin-bottom: 5px;margin-top: 5px;">
                            <legend><a>小灰</a></legend>
                        </fieldset>
                        <div style="margin-left: 20px;margin-right: 30px;">
                            <span class="layui-badge layui-bg-blue">正常用户</span>
                            <span class="layui-badge layui-bg-gray">注册时间：2024-12-17 16:41:33</span>
                            <span class="layui-badge layui-bg-gray">余额：1928.0</span>
                        </div>
                        <div style="margin-left: 30px;margin-right: 30px;margin-top: 10px;margin-bottom: 30px;">
                            <a href="adminUser.html"
                               class="layui-btn layui-btn-sm layui-btn-primary layui-btn-radius">限制该用户状态</a>
                            <a onclick="addMoney(7)"
                               class="layui-btn layui-btn-sm layui-btn-primary layui-btn-radius">用户信息及余额操作</a>
                        </div>

                        <div style="margin-left: 20px;margin-right: 30px;margin-top: 20px;"></div>
                        <fieldset class="layui-elem-field layui-field-title"
                                  style="margin: 20px;margin-bottom: 5px;margin-top: 5px;">
                            <legend><a>小灰</a></legend>
                        </fieldset>
                        <div style="margin-left: 20px;margin-right: 30px;">
                            <span class="layui-badge layui-bg-blue">正常用户</span>
                            <span class="layui-badge layui-bg-gray">注册时间：2024-12-17 16:41:33</span>
                            <span class="layui-badge layui-bg-gray">余额：1928.0</span>
                        </div>
                        <div style="margin-left: 30px;margin-right: 30px;margin-top: 10px;margin-bottom: 30px;">
                            <a href="adminUser.html"
                               class="layui-btn layui-btn-sm layui-btn-primary layui-btn-radius">限制该用户状态</a>
                            <a onclick="addMoney(7)"
                               class="layui-btn layui-btn-sm layui-btn-primary layui-btn-radius">用户信息及余额操作</a>
                        </div>

                    </fieldset>

                </div>
                <div class="layui-col-md1">&nbsp;</div>
            </div>

        </div>

    </div>

    <div class="layui-footer" align="center">
        <!-- 底部固定区域 -->
        © - 校园即时服务平台
    </div>
</div>
<script src="./layui2_9/layui.js"></script>


<script>
    //JavaScript代码区域
    layui.use('element', function () {
        var element = layui.element;
        // 监听侧边导航栏的点击事件
        element.on('nav(test)', function (elem) {
            var parentLi = elem.closest('li.layui-nav-item');
            var allNavItems = document.querySelectorAll('.layui-nav-tree.layui-nav li.layui-nav-item');
            // 遍历所有导航项
            allNavItems.forEach(function (item) {
                if (item!== parentLi) {
                    // 关闭其他导航项的子菜单
                    var childMenu = item.querySelector('dl.layui-nav-child');
                    if (childMenu) {
                        // 移除 layui-nav-itemed 类以关闭菜单
                        // item.classList.remove('layui-nav-itemed');
                    }
                }
            });
            // 切换当前点击的导航项的展开/关闭状态
            // parentLi.addClass("layui-nav-itemed")
        });
    });
</script>

<script>
    layui.use(['form'], function () {
        var form = layui.form,
            layer = layui.layer;

        //自定义验证规则
        form.verify({
            studentid: function (value) {
                if (value.length < 5) {
                    return '学号至少得5个字符啊';
                }
            },
            name: function (value) {
                if (value.length < 1) {
                    return '姓名至少得1个字符啊';
                }
            }
        });

        //监听提交
        form.on('submit(reform)', function (data) {
            layer.alert(JSON.stringify(data.field), {
                title: '最终的提交信息'
            })
            //return false;
        });


    });
</script>
<script>
    function addMoney(stuid) {
        //iframe层
        layer.open({
            type: 2,
            title: '用户信息及余额操作',
            shadeClose: true,
            shade: false,
            area: ['1000px', '650px'],
            content: 'adminUserMoney.html'
        });
    }
</script>
<script>
    function showPrivate(value) {
        window.sessionStorage.setItem("username",value);
        //iframe层
        layer.open({
            type: 2,
            title: '即时通信',
            shade: 0.6, // 遮罩透明度
            shadeClose: true, // 点击遮罩区域，关闭弹层
            area: ['1000px', '600px'],
            content: 'userTalk.html'
        });
    }
</script>
</body>
</html>
